package xiangmu.schoolpaper.service.impl.system;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xiangmu.schoolpaper.pojo.VO.TemplateOneVO;
import xiangmu.schoolpaper.mapper.system.TemplateOneMapper;
import xiangmu.schoolpaper.service.system.TemplateOneService;

import java.time.LocalDateTime;

@Service

public class TemplateOneServiceImpl implements TemplateOneService {
    @Autowired
    public TemplateOneMapper templateMapper;
    @Override
    public TemplateOneVO getTemplateByFacultyMajorAndType(String faculty, String major,String type){
        return  templateMapper.getTemplateByFacultyMajorAndType(faculty, major, type);}
    @Override
    public TemplateOneVO gettemplateById(Integer id) {
        return templateMapper.gettemplateById(id);
    }
    @Override
    public TemplateOneVO getparameterById(Integer id) {
        return templateMapper.getparameterById(id);
    }

    @Override
    public void updatetemplate(TemplateOneVO template) {
        template.setUpdatedTime(LocalDateTime.now());
        templateMapper.updatetemplate(template);
    }

}
